package com.xuecheng.base.util;

import org.springframework.context.ApplicationContext;

/**
 * @author HZQ
 * @description         
 * @date 2021/8/25
 */
public class SpringUtils {

    private static ApplicationContext applicationContext;

    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    public static void setApplicationContext(ApplicationContext applicationContext) {
        SpringUtils.applicationContext = applicationContext;
    }

   public static Object getBean(String beanId) {
        return applicationContext.getBean(beanId);
    }
}
